3.1.58 \(\int (1+\cos ^2(x))^{3/2} \, dx\) [58]

Optimal. Leaf size=43 \[ 2 E\left (\left .\frac {\pi }{2}+x\right |-1\right )-\frac {2}{3} F\left (\left .\frac {\pi }{2}+x\right |-1\right )+\frac {1}{3} \cos (x) \sqrt {1+\cos ^2(x)} \sin (x) \]

[Out]

-2*(sin(x)^2)^(1/2)/sin(x)*EllipticE(cos(x),I)+2/3*(sin(x)^2)^(1/2)/sin(x)*EllipticF(cos(x),I)+1/3*cos(x)*sin(
x)*(1+cos(x)^2)^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 43, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.400, Rules used = {3259, 3251, 3256, 3261} \begin {gather*} -\frac {2}{3} F\left (\left .x+\frac {\pi }{2}\right |-1\right )+2 E\left (\left .x+\frac {\pi }{2}\right |-1\right )+\frac {1}{3} \sin (x) \cos (x) \sqrt {\cos ^2(x)+1} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(1 + Cos[x]^2)^(3/2),x]

[Out]

2*EllipticE[Pi/2 + x, -1] - (2*EllipticF[Pi/2 + x, -1])/3 + (Cos[x]*Sqrt[1 + Cos[x]^2]*Sin[x])/3

Rule 3251

Int[((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)]^2)/Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2], x_Symbol] :> Dist[
B/b, Int[Sqrt[a + b*Sin[e + f*x]^2], x], x] + Dist[(A*b - a*B)/b, Int[1/Sqrt[a + b*Sin[e + f*x]^2], x], x] /;
FreeQ[{a, b, e, f, A, B}, x]

Rule 3256

Int[Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2], x_Symbol] :> Simp[(Sqrt[a]/f)*EllipticE[e + f*x, -b/a], x] /
; FreeQ[{a, b, e, f}, x] && GtQ[a, 0]

Rule 3259

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> Simp[(-b)*Cos[e + f*x]*Sin[e + f*x]*((a + b*Si
n[e + f*x]^2)^(p - 1)/(2*f*p)), x] + Dist[1/(2*p), Int[(a + b*Sin[e + f*x]^2)^(p - 2)*Simp[a*(b + 2*a*p) + b*(
2*a + b)*(2*p - 1)*Sin[e + f*x]^2, x], x], x] /; FreeQ[{a, b, e, f}, x] && NeQ[a + b, 0] && GtQ[p, 1]

Rule 3261

Int[1/Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2], x_Symbol] :> Simp[(1/(Sqrt[a]*f))*EllipticF[e + f*x, -b/a]
, x] /; FreeQ[{a, b, e, f}, x] && GtQ[a, 0]

Rubi steps

\begin {align*} \int \left (1+\cos ^2(x)\right )^{3/2} \, dx &=\frac {1}{3} \cos (x) \sqrt {1+\cos ^2(x)} \sin (x)+\frac {1}{3} \int \frac {4+6 \cos ^2(x)}{\sqrt {1+\cos ^2(x)}} \, dx\\ &=\frac {1}{3} \cos (x) \sqrt {1+\cos ^2(x)} \sin (x)-\frac {2}{3} \int \frac {1}{\sqrt {1+\cos ^2(x)}} \, dx+2 \int \sqrt {1+\cos ^2(x)} \, dx\\ &=2 E\left (\left .\frac {\pi }{2}+x\right |-1\right )-\frac {2}{3} F\left (\left .\frac {\pi }{2}+x\right |-1\right )+\frac {1}{3} \cos (x) \sqrt {1+\cos ^2(x)} \sin (x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.06, size = 39, normalized size = 0.91 \begin {gather*} \frac {24 E\left (x\left |\frac {1}{2}\right .\right )-4 F\left (x\left |\frac {1}{2}\right .\right )+\sqrt {3+\cos (2 x)} \sin (2 x)}{6 \sqrt {2}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(1 + Cos[x]^2)^(3/2),x]

[Out]

(24*EllipticE[x, 1/2] - 4*EllipticF[x, 1/2] + Sqrt[3 + Cos[2*x]]*Sin[2*x])/(6*Sqrt[2])

________________________________________________________________________________________

Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 100 vs. \(2 (49 ) = 98\).
time = 0.49, size = 101, normalized size = 2.35

method result size
default \(\frac {\sqrt {\left (1+\cos ^{2}\left (x \right )\right ) \left (\sin ^{2}\left (x \right )\right )}\, \left (-\cos \left (x \right ) \left (\sin ^{4}\left (x \right )\right )+2 \sqrt {\frac {1}{2}-\frac {\cos \left (2 x \right )}{2}}\, \sqrt {-\left (\sin ^{2}\left (x \right )\right )+2}\, \EllipticF \left (\cos \left (x \right ), i\right )-6 \sqrt {\frac {1}{2}-\frac {\cos \left (2 x \right )}{2}}\, \sqrt {-\left (\sin ^{2}\left (x \right )\right )+2}\, \EllipticE \left (\cos \left (x \right ), i\right )+2 \left (\sin ^{2}\left (x \right )\right ) \cos \left (x \right )\right )}{3 \sqrt {1-\left (\cos ^{4}\left (x \right )\right )}\, \sin \left (x \right ) \sqrt {1+\cos ^{2}\left (x \right )}}\) \(101\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((1+cos(x)^2)^(3/2),x,method=_RETURNVERBOSE)

[Out]

1/3*((1+cos(x)^2)*sin(x)^2)^(1/2)*(-cos(x)*sin(x)^4+2*(sin(x)^2)^(1/2)*(-sin(x)^2+2)^(1/2)*EllipticF(cos(x),I)
-6*(sin(x)^2)^(1/2)*(-sin(x)^2+2)^(1/2)*EllipticE(cos(x),I)+2*sin(x)^2*cos(x))/(1-cos(x)^4)^(1/2)/sin(x)/(1+co
s(x)^2)^(1/2)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1+cos(x)^2)^(3/2),x, algorithm="maxima")

[Out]

integrate((cos(x)^2 + 1)^(3/2), x)

________________________________________________________________________________________

Fricas [F]
time = 0.09, size = 10, normalized size = 0.23 \begin {gather*} {\rm integral}\left ({\left (\cos \left (x\right )^{2} + 1\right )}^{\frac {3}{2}}, x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1+cos(x)^2)^(3/2),x, algorithm="fricas")

[Out]

integral((cos(x)^2 + 1)^(3/2), x)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (\cos ^{2}{\left (x \right )} + 1\right )^{\frac {3}{2}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1+cos(x)**2)**(3/2),x)

[Out]

Integral((cos(x)**2 + 1)**(3/2), x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1+cos(x)^2)^(3/2),x, algorithm="giac")

[Out]

integrate((cos(x)^2 + 1)^(3/2), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int {\left ({\cos \left (x\right )}^2+1\right )}^{3/2} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((cos(x)^2 + 1)^(3/2),x)

[Out]

int((cos(x)^2 + 1)^(3/2), x)

________________________________________________________________________________________